package com.guli.gulimall.member.controller;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/hello")
@RestController
@RefreshScope
@Data
public class HelloController {

    @Value("${member.name}")
    private String name;

    @Value("${member.age}")
    private String age;


    @RequestMapping("/getMsg")
    public String getMsg(){
        return "姓名:"+getName()+
                "年龄:"+getAge()+"\n\n";
    }
}
